// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:14

// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   oo.java

package com.zelix;

import java.util.*;

// Referenced classes of package com.zelix:
//            mo, fh, l5, vp, 
//            mt, lu, iu, fy, 
//            oy, qy, tb

class oo extends mo
{

    private boolean d;
    private String h;
    private boolean e;
    vp f;
    private Object g;
    private static String z[];

    oo(int i, boolean flag, String s, boolean flag1)
    {
        super(i);
        g = new Object();
        d = flag;
        if(flag)
            f = new vp(0);
        h = s;
        e = flag1;
    }

    public String a(fh fh1, lu lu1, String s, String s1, String s2, Hashtable hashtable, qy qy1, 
            qy qy2, Hashtable hashtable1, boolean flag, HashMap hashmap, HashMap hashmap1, fy fy1, fy fy2)
    {
        mt mt1;
        boolean flag1;
        flag1 = tb.b;
        if(super.b != 1 && ((s.startsWith(z[2]) && flag || s.startsWith(z[1])) && oy.a(s.substring(z[2].length())) || s.startsWith(z[0]) && flag || s.startsWith(z[3])))
        {
            hashtable.put(s, lu1);
            hashtable1.put(s, lu1);
            return null;
        }
        mt1 = fh1.c();
        if(!e) goto _L2; else goto _L1
_L1:
        Vector vector = qy1.d(s2);
        if(vector == null) goto _L2; else goto _L3
_L3:
        int i = 0;
        if(!flag1) goto _L5; else goto _L4
_L4:
        Object obj = vector.elementAt(i);
        if(obj instanceof String)
        {
            String s3 = (String)obj;
            if(!s3.equals(s) && a(s, s3, lu1, hashtable1, hashtable, fy1, fy2, mt1, hashmap, hashmap1))
            {
                hashtable1.put(s3, s3);
                vector.setElementAt(g, i);
                return s3;
            }
            vector.setElementAt(g, i);
        }
        i++;
_L5:
        if(i < vector.size()) goto _L4; else goto _L2
_L2:
        String s4;
        do
            s4 = a(fh1);
        while(!a(s, s4, lu1, hashtable1, hashtable, fy1, fy2, mt1, hashmap, hashmap1));
        hashtable.put(s4, lu1);
        hashtable1.put(s4, lu1);
        qy2.b(s2, s4);
        return s4;
    }

    private String a(fh fh1)
    {
        if(fh1 != super.c)
        {
            super.c = fh1;
            super.a = -1;
        }
        if(d)
        {
            String s = null;
            do
                s = f.a(++super.a, h);
            while(s == null);
            return s;
        } else
        {
            return (h == null ? "" : h) + String.valueOf(++super.a);
        }
    }

    private boolean a(String s, lu lu1, HashMap hashmap, HashMap hashmap1)
    {
        return hashmap != null && s.equals((String)hashmap.get(lu1)) || s.equals((String)hashmap1.get(lu1));
    }

    private boolean a(String s, String s1, lu lu1, Hashtable hashtable, Hashtable hashtable1, fy fy1, fy fy2, 
            mt mt1, HashMap hashmap, HashMap hashmap1)
    {
        Hashtable hashtable2;
        boolean flag;
        flag = tb.b;
        if(s.equals(s1))
            return false;
        if(hashtable.containsKey(s1))
            return false;
        if(fy1.a(mt1, new l5(s1, lu1.q())))
            return false;
        hashtable2 = fy2.b(mt1);
        if(hashtable2 == null) goto _L2; else goto _L1
_L1:
        Enumeration enumeration = hashtable2.keys();
        if(!flag) goto _L4; else goto _L3
_L3:
        lu lu2 = (lu)enumeration.nextElement();
        if(a(s1, lu2, hashmap, hashmap1))
            return false;
_L4:
        if(enumeration.hasMoreElements()) goto _L3; else goto _L2
_L2:
        enumeration = mt1.X();
        if(enumeration == null) goto _L6; else goto _L5
_L5:
        if(!flag) goto _L8; else goto _L7
_L7:
        lu lu3 = (lu)enumeration.nextElement();
        if(a(s1, lu3, hashmap, hashmap1))
            return false;
_L8:
        if(enumeration.hasMoreElements()) goto _L7; else goto _L6
_L6:
        return !hashtable1.containsKey(s1) || e;
    }

        private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x78;
                    break;
                case 1:
                    key = 38;
                    break;
                case 2:
                    key = 31;
                    break;
                case 3:
                    key = 78;
                    break;
                default:
                    key = 104;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static 
    {
        String as[];
        as = new String[4];
        as[0] = "\016Gsj";
        as[1] = "\fNv=C";
        as[2] = "\fNv=L";
        as[3] = "\016Gse";
        for (int i = 0; i < as.length; i++) {
            as[i] = z(as[i].toCharArray());
        }
        z = as;

    }
}